<?php
/* @var $this ProposalController */
/* @var $model Proposal */
?>

<?php
$this->breadcrumbs=array(
	 Yii::t('proposal_messages','proposal.label'),
);

?>

<h1><?php echo Yii::t('proposal_messages','proposal.label') ?></h1>
<br/><br/>
<?php if(Yii::app()->user->hasFlash('proposal.subm')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('proposal.subm'); ?>
</div>

<script type="text/javascript">
	setTimeout(function(){location.href="<?php echo Yii::app()->homeUrl;?>"} , 3000);   
</script>

<?php else: ?>

<?php 
if(Yii::app()->language == 'ar') $optArray = array('class'=>'pull-right');
else $optArray = array('class'=>'pull-left');

$this->widget('bootstrap.widgets.TbTabs', array(
		'placement'=>'above',
		'tabs'=>array(
				array(  
						'id'=>'professionTab',
						'active'=>true,
						'label'=>Yii::t('proposal_messages','proposal.profession.label'),
						'content'=>$this->renderPartial("profession_form", array('model' => $model),true),
						'htmlOptions'=>$optArray,
				),
				array(
						'id'=>'regionTab',
						'active'=>false,
						'label'=>Yii::t('proposal_messages','proposal.region.label'),
						'content'=>$this->renderPartial("region_form", array('model' => $model),true),
						'htmlOptions'=>$optArray,
				),

				array(
						'id'=>'otherTab',
						'active'=>false,
						'label'=>Yii::t('proposal_messages','proposal.other.label'),
						'content'=>$this->renderPartial("other_form", array('model' => $model),true),
						'htmlOptions'=>$optArray,
				),
		),
		
));

/*
1- profession
2- region 
3- other
4 - bug
*/
?>

<?php endif; ?>